<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<style>
			html,
			body {
				height: 100%;
				margin: 0;
				padding: 0

			}
			/*画布*/
			canvas {
  width: 35%;
  height: 80%;
}          /*画布ending*/
			ul,
			li {
				text-indent: 0;
				text-decoration: none;
				margin: 0;
				padding: 0
			}
			
			img {
				border: 0
			}
			
			body {
				background-color: #white;
				color: #999;
				font: 100%/18px helvetica, arial, sans-serif
			}
			
			canvas {
				cursor: crosshair;
				display: block;
				left: 0;
				position: absolute;
				top: 0;
				z-index: 20
			}
			/*<script type="text/javascript" src="js/jquery-2.0.0.min.js"></script>
<script type="text/javascript" src="js/texiao.js"></script>*/
			
			<style>.footer {
				position: absolute;
				bottom: 0;
				width: 100%;
				height: 100px;
				background-color: #ffc0cb;
			}
			
			.a2 {
				list-style-type: none;
				margin: 0;
				padding: 0;
				width: 120px;
				height: 500px;
				background-color: black
			}
			
			.a1 {
				display: block;
				color: #000;
				padding: 8px 16px;
				text-decoration: none;
			}
			/* 鼠标移动到选项上修改背景颜色 */
			
			.a1:hover {
				background-color: #555;
				color: white;
			}
			
			.footer {
				position: absolute;
				bottom: 0;
				width: 100%;
				height: 100px;
				background-color: #ffc0cb;
			}
		</style>

		<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
		<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

		<!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
		<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">

		<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
		<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
	</head>

	<body style="background: url(images/1.gif) ;background-size:cover; " ) >
		<script type="text/javascript">
		</script>
	

		<div class="row">

			<div class="row clearfix">
				<div class="col-md-12 ">

				</div>
				<ol class="navbar navbar-inverse" id="info">

					<div class="col-md-7">
						<ul class="nav nav-tabs">
							
							<li role="presentation" class="active">
								<a href="#">视频</a>
								
							</li>
							<li role="presentation">
								<a href="#">热搜</a>
							</li>
							<li role="presentation">
								<a href="#">收藏</a>
							</li>
							<li role="presentation">
								<a href="#">空间</a>
							</li>
							<li role="presentation">
								<a href="#">分类</a>
							</li>
							<li role="presentation">
								<li role="presentation">
									<a href="#">空间</a>
								</li>
								<li role="presentation">
									<a href="#">换肤</a>
								</li>
                               <i>
								<marquee><a align="center" 
									style="color: red;font-size: x-large;" >
									这个世界很酷~</a></marquee></i>
						</ul>
						
					</div>

					<!--  -->

					<div class="col-md-5">
						<ul class="nav nav-tabs">
							<li>
								<a>
									<img src="images/定位.jpg" height="20px" width="20px"> 大连[切换]
								</a>
							</li>

							<li role="presentation">
								<a>
									<img src="images/语言.jpg" width="20px" height="20px" />
									<select name="language">
										<option value="">language</option>
										<option value="">中文</option>
										<option value="">英语</option>
										<option value="">西班牙语</option>
										<option value="">俄罗斯语</option>
										<option value="">孟加拉语</option>
										<option value="">阿拉伯语</option>
										<option value="">印度语</option>
										<option value="">日语</option>
										<option value="">法语</option>
										<option value="">德语</option>
										<option value="">点击查看更多语言</option>
									</select>
								</a>
							</li>
							<li role="presentation">
								<a href="#">客服</a>
							</li>
       				<li>
									<?php
		 if (isset($_GET["msg"])) {
		  echo $_GET["msg"];
		}
	   ?>
								
								 <?php 
       session_start();
       if(!isset($_SESSION["user"])){
        ?>
        <li><a href="/final_project/login/login.html" data-toggle="modal" data-target="#login">登录</a></li>
        <li><a href="/final_project/login/register.html" data-toggle="modal" data-target="#reg">注册</a></li>
        <?php        
       }else{
      ?>
      <li><a href="/final_project/login/login.html">欢迎【<?php echo $_SESSION["user"];?>】</a></li>
      <li><a href="qt_logout.php">注销</a></li>
        <li><a href="myCommentList.php" >我的评价</a></li>
    
      <?php
        }
    ?>
								
							</li>
						</ul>

					</div>

			</div>
		</div>
		</div>
		<!-- 主题内容-->
		<a style="color:red">提示：无聊的时候可以玩一玩休闲小游戏奥： </a>&nbsp;&nbsp;
		<a href="剪刀石头布.html">剪刀石头布</a>
		&nbsp;&nbsp;
		<a href="俄罗斯方块.html">俄罗斯小方块</a>
		<!-- 网页主题内容 -->

		<div class="row" style="background-color:#FDF7F7" >
			<div class="col-md-12" style="color: red">
			<div class="col-md-4">
			<p>按地区/时间</p>
			<p>
				<a href="#">国产</a>&nbsp; <a href="#">日本</a>&nbsp; <a href="#">欧美</a>&nbsp;
				<a href="#">其他</a>&nbsp;<br> <a href="#">2019</a>&nbsp; <a
					href="#">2018</a>&nbsp; <a href="#">2017</a>&nbsp; <a href="#">.....</a>&nbsp;
			</p>
		</div>
		<div class="col-md-4">
			<p>类型</p>
			<p>
				<a href="#">热血</a>&nbsp; <a href="#">搞笑</a>&nbsp; <a href="#">青春</a>&nbsp;
				<a href="#">电影</a>&nbsp; <a href="#">直播</a>&nbsp; <a href="#">教育</a>&nbsp;
				<a href="#">综艺</a>&nbsp; <a href="#">音乐</a>&nbsp; <a href="#">游戏</a>&nbsp;
				<a href="#">动漫</a>&nbsp; <a href="#">汽车</a>&nbsp; <a href="#">VR</a>&nbsp;
				<a href="#">娱乐</a>&nbsp; <a href="#">公益</a>&nbsp; <a href="#">资讯</a>&nbsp;
				<a href="#">生活</a>&nbsp; <a href="#">科技</a>&nbsp; <a href="#">财经</a>&nbsp;
				<a href="#">少儿</a>&nbsp; <a href="#">体育</a>&nbsp; <a href="#">时尚</a>&nbsp;
				<a href="#">来疯</a>&nbsp; <a href="#">其他</a>&nbsp;
			</p>
		</div>
		<div class="col-md-4">
			<p>按语言</p>
			<p>
				<a href="#">日语</a>&nbsp; <a href="#">国语</a>&nbsp; <a href="#">粤语</a>&nbsp;
				<a href="#">英语</a>&nbsp;<br> <a href="#">韩语</a>&nbsp; <a
					href="#">方言</a>&nbsp; <a href="#">其他</a>&nbsp;
			</p>
		</div>
		</div>
		</div>
		
		<!-- 搜索开始 -->
			<div class="row" style="background-color:#FDF7F7" >
		&nbsp;&nbsp;&nbsp;&nbsp;<?php
			require_once('head.php');
			?>
		
		</div>
		  <!-- 搜索 engding -->


<?php
 require_once('head.php');
 include_once('dbConn.php');
  //连接数据库		
connect();
session_start();
 //类型id是通过GET方法提交的   
 //根据类型vid从数据库中查询某个特定视频信息
 error_reporting(0);
   $vid = $_GET['vid'];
   $uid = $_GET['uid']; 
   $sql="select * from videos where vid=$vid";
   //echo $sql;
   $result = mysql_query($sql) or die('查询1失败！'.mysql_error());   
   $row = mysql_fetch_assoc($result);
  //取得留言分页记录
 //获取指定的页码
  //判断是否指定第几页，如果没有指定，则显示第1页。
	if(!isset($_GET["page"]))
	$page=1;
	else{
		$page=$_GET["page"];
	}
//获取总行数，用于计算分几页显示
  $sql0="select * from comments where vid=$vid";
  $result0 = mysql_query($sql0);
  $totalrows = mysql_num_rows($result0);
//定义每页显示的行数
  $rowsperpage =20;
//计算从表中第几行开始输出
  $start = ($page-1) * $rowsperpage;
 //查询用户，从第$start行开始，共查询$rowsperpage行。
  $sql0.= " limit {$start}, {$rowsperpage}";
 // echo $sql0.'<br/>';
  //执行sql语句
  $result0= mysql_query($sql0) or die('查询2失败！'.mysql_error());  
//更新点击量
$hit=$row["hittimes"]+1;
$sql2="update videos set hittimes=$hit where vid=$vid";
 mysql_query($sql2) or die('查询3失败！'.mysql_error()); 
?>
<!--
	作者：1161105403@qq.com
	时间：2019-05-24
	描述： 显示视频海报，标题和总评分
-->
<div class="col-md-4 text-center">
                  <img src="/final_project/foreground_system/lite/images/<?php
                  echo $row["pic"];
                  ?>
                  " width="200" height="250">
<!-- 点击标题显示新窗口中的视频-->
<div class="theme-buy">
         <a class="theme-login" href="javascript:;">
		<h3 class="brand-name" title="点击这里可在线播放~"><?php
           echo $row["videoname"];
          ?><img src="/final_project/foreground_system/lite/images/play.jpg" width="30px" height="30px">
        </h3></a>
</div>
<div class="theme-popover">
     <div class="theme-poptit">
          <a  href="javascript:;" title="关闭" class="close">×</a>
          <h4><?php
                echo $row["videoname"];
                ?> </h4>
     </div>
     <div>     	
 <video id="myVideo" src=<?php
echo $row["address"];
?> controls  width="100%" height="1000%"></video>
</div>
</div>
<div class="theme-popover-mask"></div>

<!-- 显示总评分-->
<ul class="list-inline row text-center">
	<?php
		$sqls="select avg(score) from levels where vid=$vid";
         $query=mysql_query($sqls) or die('查询4失败！'.mysql_error());  
        while($row1=mysql_fetch_array($query))
{
$number= $row1['0']; 
$p= stripos($number, '.'); 
//echo substr($number,0,$p+2);
if($number==0)
	echo" <li><h4>影片评分：暂无评分";
else
	echo" <li><h4>影片评分：</h4></li>".substr($number,0,$p+2);
 }
?>
 </ul>
<!-- 显示总评分 结束-->
</div>

<!--
	作者：1161105403@qq.com
	时间：2019-05-24
	描述：显示视频专栏名称，上传时间，点击次数，上传人，下载次数等：
	starting
-->

<div class="col-md-8 text-center">
                  <table class="table">
					<tr>
					<td>专栏</td>
					<td><?php
					$tid=$row["tid"];
					$sqlt="select * from videotype where tid=$tid";
					$result=mysql_query($sqlt) or die('查询5失败！'.mysql_error());
					$vname=mysql_fetch_assoc($result);
					echo $vname["typename"];
					?>
					</td>
					</tr>
					<tr>
					<td>上传时间</td>
					<td><?php
					echo $row["uploaddate"];
					?>
					</td>
					</tr>
					<tr>
					<td>点击次数</td>
					<td><?php
					echo $row["hittimes"];;
					?>
					</td>
					</tr>
					<tr>
					<td>上传人</td>
					<td>
					<?php
					$adminid=$row["uploadadmin"];
	$adminrs=mysql_query("select * from admins where adminid=$adminid");
					$admin=mysql_fetch_assoc($adminrs);
					echo $admin["adminname"];
					?>
					</td>
					</tr>
					<tr>
					<td>下载次数</td>
					<td> <?php
                    echo $row["downtimes"];
                    ?>                   
					</td>
					</tr>
					<tr>
					<td>管理员</td>
					<td><a href="#">意见箱</a>
					</td>
					</tr>
					<tr>
					<td>下载地址</td>
					<!--HTML方式直接下载-->
					<!--<td> <a href="/final_project/foreground_system/lite/video/七里香.mp4?vid=<?php
    echo $row["vid"];?>" >点击这里下载</a>
					</td>-->
					<td> <a href="download.php?vid=<?php
    echo $row["vid"];?>" >下载</a>
					</td>
					<!--PHP方式输出-->
					<td> 
		<!--<a href="download.php">
		下载
		</a>	-->
						
					</td>
					</tr>
					<tr>
					<td>评分</td>
					<td>
<?php 
//登录后的用户才可以评分
    if(isset($_SESSION["user"]))
	{
?>	
	<form name="f1" method="get" action="doLevel.php" onsubmit="check()" class="form-horizontal">
	<input type="hidden"name="vid" value="<?php
echo $row["vid"];
?>">
<select  name="level" required>
  <option selected value="">评价影片</option>
  <option value="5">力推★★★★★</option>
  <option value="4">推荐★★★★</option>
  <option value="3">还行★★★</option>
  <option value="2">较差★★</option>
  <option value="1">很差★</option>
</select>
	<input type="submit" value=" 评价">
	</form>
<?php
	}else{
		?>             
	<h3 ><a href="#" data-toggle="modal" data-target="#login"  onclick="func(<?php
    echo $row['vid']
    ?>)">登录</a>后可以评分</h3>
		<?php
	}
?>
					</td>
					</tr>
				  </table>
                </div>

<footer></footer>


<!--
	作者：1161105403@qq.com
	时间：2019-05-24
	描述：显示视频专栏名称，上传时间，点击次数，上传人，下载次数等
	ending
-->


<!--
	描述：从show登陆成功后取得vid并跳转到登录页面~
	starting
-->

 <script>
 function func(vid){
	document.getElementById("videoid").value=vid;
   document.getElementById("login").modal();
	}
 </script>



<!--
	描述：从show登陆成功后取得vid并跳转到登录页面~
	engding
-->
<!--
	显示视频简介starting
-->
<div class="col-lg-12">
            <h3 class="intro-text text-center">内容简介</h3>
			<?php
             echo $row["intro"];
             ?>
            </div>
<!--
	显示视频简介ending
-->

<!--
	分页显示留言列表 starting
-->

<?php
//如果有留言显示留言列表		
$num=mysql_num_rows($result0);
if($num>0)
		{
?>
 <div class="row box">
   <div class="col-md-12">
     <h3 class="intro-text text-center">留言列表</h3>
     <a href="mycommentList.php">留言管理</a>
	<table class="table" align="center">
	<tr>
	<th>序号</th>
	<th>内容</th>
    <th>评论人</th>
	<th>发表时间</th>
	</tr>
    <?php
    $i=1;
    while($row=mysql_fetch_assoc($result0))
		{
    ?>
    <tr>
    <td width="10%"><?php
    echo $i++;
    ?>
    </td>
	    <td width="50%"><?php
    echo $row["content"];
    ?>
    </td>
	<td width="20%"><?php
   $uid=$row["uid"];
					$userrs=mysql_query("select * from users where uid=$uid");
					$user=mysql_fetch_assoc($userrs);
					echo $user["uname"];
    ?>
    </td>
	<td width="20%"><?php
    echo $row["cdate"];
    ?>
    </td>
    </tr>
    <?php
		}//end of while
    ?>
  </table>
  <div align="center">

<?php 
  // 此处略去显示分页页码超链接的代码
  
  
  
  ?>
</div>
 </div>
</div>
<?php
		}//end of if
else{
?>
<div class="row box">
   <div class="col-md-12">
         <h3 class="intro-text text-center">暂无留言</h3>
</div>
</div>
<?php
 }
 ?>



<!--
	分页显示留言列表ending
-->



<!--
	用户发表留言功能starting
-->

<?php 
    session_start();
    if(isset($_SESSION["user"]))
	{
?>	
<div class="row box">
<div class="col-md-12">
 <h3 class="intro-text text-center">您的留言</h3>
<form method="post" action="doComment.php" class="form-horizontal">
<input type="hidden" name="vid" value=<?php echo $vid ?>>
	<div class="form-group">
      <div class="col-md-12">
<textarea class="form-control" cols="80" rows="10"  required name="content"></textarea>
	</div>
  </div>
   <div class="form-group">
    <div class="col-md-12 text-center">
      <input type="submit" class="btn btn-default" value="发表留言">
	 </div>
  </div>
</form>
         </div>
        </div>
<?php
	}else{
?>
	 <div class="row box">
     <div class="col-lg-12" style="align:center;">
	<h3 ><a href="#" data-toggle="modal" data-target="#login"  onclick="func(<?php
    echo $row['vid']
    ?>)">登录</a>后可以发表留言</h3>
	</div>
	</div>
<?php
	}
?>



<!--
	用户发表留言功能ending
-->
<div style="text-align:center;clear:both;">
<script src="/gg_bd_ad_720x90.js" type="text/javascript"></script>
<script src="/follow.js" type="text/javascript"></script>
</div>

<canvas id="pinkboard"></canvas>

<script>
/*
 * Settings
 */
var settings = {
  particles: {
    length:   500, // maximum amount of particles
    duration:   2, // particle duration in sec
    velocity: 100, // particle velocity in pixels/sec
    effect: -0.75, // play with this for a nice effect
    size:      30, // particle size in pixels
  },
};

/*
 * RequestAnimationFrame polyfill by Erik M?ller
 */
(function(){var b=0;var c=["ms","moz","webkit","o"];for(var a=0;a<c.length&&!window.requestAnimationFrame;++a){window.requestAnimationFrame=window[c[a]+"RequestAnimationFrame"];window.cancelAnimationFrame=window[c[a]+"CancelAnimationFrame"]||window[c[a]+"CancelRequestAnimationFrame"]}if(!window.requestAnimationFrame){window.requestAnimationFrame=function(h,e){var d=new Date().getTime();var f=Math.max(0,16-(d-b));var g=window.setTimeout(function(){h(d+f)},f);b=d+f;return g}}if(!window.cancelAnimationFrame){window.cancelAnimationFrame=function(d){clearTimeout(d)}}}());

/*
 * Point class
 */
var Point = (function() {
  function Point(x, y) {
    this.x = (typeof x !== 'undefined') ? x : 0;
    this.y = (typeof y !== 'undefined') ? y : 0;
  }
  Point.prototype.clone = function() {
    return new Point(this.x, this.y);
  };
  Point.prototype.length = function(length) {
    if (typeof length == 'undefined')
      return Math.sqrt(this.x * this.x + this.y * this.y);
    this.normalize();
    this.x *= length;
    this.y *= length;
    return this;
  };
  Point.prototype.normalize = function() {
    var length = this.length();
    this.x /= length;
    this.y /= length;
    return this;
  };
  return Point;
})();

/*
 * Particle class
 */
var Particle = (function() {
  function Particle() {
    this.position = new Point();
    this.velocity = new Point();
    this.acceleration = new Point();
    this.age = 0;
  }
  Particle.prototype.initialize = function(x, y, dx, dy) {
    this.position.x = x;
    this.position.y = y;
    this.velocity.x = dx;
    this.velocity.y = dy;
    this.acceleration.x = dx * settings.particles.effect;
    this.acceleration.y = dy * settings.particles.effect;
    this.age = 0;
  };
  Particle.prototype.update = function(deltaTime) {
    this.position.x += this.velocity.x * deltaTime;
    this.position.y += this.velocity.y * deltaTime;
    this.velocity.x += this.acceleration.x * deltaTime;
    this.velocity.y += this.acceleration.y * deltaTime;
    this.age += deltaTime;
  };
  Particle.prototype.draw = function(context, image) {
    function ease(t) {
      return (--t) * t * t + 1;
    }
    var size = image.width * ease(this.age / settings.particles.duration);
    context.globalAlpha = 1 - this.age / settings.particles.duration;
    context.drawImage(image, this.position.x - size / 2, this.position.y - size / 2, size, size);
  };
  return Particle;
})();

/*
 * ParticlePool class
 */
var ParticlePool = (function() {
  var particles,
      firstActive = 0,
      firstFree   = 0,
      duration    = settings.particles.duration;
  
  function ParticlePool(length) {
    // create and populate particle pool
    particles = new Array(length);
    for (var i = 0; i < particles.length; i++)
      particles[i] = new Particle();
  }
  ParticlePool.prototype.add = function(x, y, dx, dy) {
    particles[firstFree].initialize(x, y, dx, dy);
    
    // handle circular queue
    firstFree++;
    if (firstFree   == particles.length) firstFree   = 0;
    if (firstActive == firstFree       ) firstActive++;
    if (firstActive == particles.length) firstActive = 0;
  };
  ParticlePool.prototype.update = function(deltaTime) {
    var i;
    
    // update active particles
    if (firstActive < firstFree) {
      for (i = firstActive; i < firstFree; i++)
        particles[i].update(deltaTime);
    }
    if (firstFree < firstActive) {
      for (i = firstActive; i < particles.length; i++)
        particles[i].update(deltaTime);
      for (i = 0; i < firstFree; i++)
        particles[i].update(deltaTime);
    }
    
    // remove inactive particles
    while (particles[firstActive].age >= duration && firstActive != firstFree) {
      firstActive++;
      if (firstActive == particles.length) firstActive = 0;
    }
    
    
  };
  ParticlePool.prototype.draw = function(context, image) {
    // draw active particles
    if (firstActive < firstFree) {
      for (i = firstActive; i < firstFree; i++)
        particles[i].draw(context, image);
    }
    if (firstFree < firstActive) {
      for (i = firstActive; i < particles.length; i++)
        particles[i].draw(context, image);
      for (i = 0; i < firstFree; i++)
        particles[i].draw(context, image);
    }
  };
  return ParticlePool;
})();

/*
 * Putting it all together
 */
(function(canvas) {
  var context = canvas.getContext('2d'),
      particles = new ParticlePool(settings.particles.length),
      particleRate = settings.particles.length / settings.particles.duration, // particles/sec
      time;
  
  // get point on heart with -PI <= t <= PI
  function pointOnHeart(t) {
    return new Point(
      160 * Math.pow(Math.sin(t), 3),
      130 * Math.cos(t) - 50 * Math.cos(2 * t) - 20 * Math.cos(3 * t) - 10 * Math.cos(4 * t) + 25
    );
  }
  
  // creating the particle image using a dummy canvas
  var image = (function() {
    var canvas  = document.createElement('canvas'),
        context = canvas.getContext('2d');
    canvas.width  = settings.particles.size;
    canvas.height = settings.particles.size;
    // helper function to create the path
    function to(t) {
      var point = pointOnHeart(t);
      point.x = settings.particles.size / 2 + point.x * settings.particles.size / 350;
      point.y = settings.particles.size / 2 - point.y * settings.particles.size / 350;
      return point;
    }
    // create the path
    context.beginPath();
    var t = -Math.PI;
    var point = to(t);
    context.moveTo(point.x, point.y);
    while (t < Math.PI) {
      t += 0.01; // baby steps!
      point = to(t);
      context.lineTo(point.x, point.y);
    }
    context.closePath();
    // create the fill
    context.fillStyle = '#ea80b0';
    context.fill();
    // create the image
    var image = new Image();
    image.src = canvas.toDataURL();
    return image;
  })();
  
  // render that thing!
  function render() {
    // next animation frame
    requestAnimationFrame(render);
    
    // update time
    var newTime   = new Date().getTime() / 1000,
        deltaTime = newTime - (time || newTime);
    time = newTime;
    
    // clear canvas
    context.clearRect(0, 0, canvas.width, canvas.height);
    
    // create new particles
    var amount = particleRate * deltaTime;
    for (var i = 0; i < amount; i++) {
      var pos = pointOnHeart(Math.PI - 2 * Math.PI * Math.random());
      var dir = pos.clone().length(settings.particles.velocity);
      particles.add(canvas.width / 2 + pos.x, canvas.height / 2 - pos.y, dir.x, -dir.y);
    }
    
    // update and draw particles
    particles.update(deltaTime);
    particles.draw(context, image);
  }
  
  // handle (re-)sizing of the canvas
  function onResize() {
    canvas.width  = canvas.clientWidth;
    canvas.height = canvas.clientHeight;
  }
  window.onresize = onResize;
  
  // delay rendering bootstrap
  setTimeout(function() {
    onResize();
    render();
  }, 10);
})(document.getElementById('pinkboard'));
</script>


</body>
</html>
